<?php
/* @var $this ServiceController */
/* @var $model Service */
/* @var $form CActiveForm */
?>

<div class="form well">

    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'service-form',
        'enableAjaxValidation' => false,
    ));
    ?>



    <?php echo $form->errorSummary($model); ?>
    <div class="span3">
        <div class="well">
            <img class="right ic" src="/images/pt.gif"/>
            <div class="row">
                <?php echo $form->labelEx($model, 'title'); ?>
                <?php echo $form->textField($model, 'title', array('size' => 60, 'maxlength' => 255)); ?>
                <?php echo $form->error($model, 'title'); ?>
            </div>

            <div class="row">
                <?php echo $form->labelEx($model, 'description'); ?>
                <?php echo $form->textArea($model, 'description', array('rows' => 6, 'cols' => 50)); ?>
                <?php echo $form->error($model, 'description'); ?>
            </div>
        </div>
        <div class="well">
            <img class="right ic" src="/images/en.gif"/>
            <div class="row">
                <?php echo $form->labelEx($model, 'title_en'); ?>
                <?php echo $form->textField($model, 'title_en', array('size' => 60, 'maxlength' => 255,'value'=>  $TitleEn)); ?>
                <?php echo $form->error($model, 'title_en'); ?>
            </div>

            <div class="row">
                <?php echo $form->labelEx($model, 'description_en'); ?>
                <?php echo $form->textArea($model, 'description_en', array('size' => 60, 'maxlength' => 500,'value'=>$DescEn)); ?>
                <?php echo $form->error($model, 'description_en'); ?>
            </div>
        </div>
        <div class="well">
            <img class="right ic" src="/images/de.gif"/>
            <div class="row">
                <?php echo $form->labelEx($model, 'title_de'); ?>
                <?php echo $form->textField($model, 'title_de', array('size' => 60, 'maxlength' => 255,'value'=>$TitleDe)); ?>
                <?php echo $form->error($model, 'title_de'); ?>
            </div>

            <div class="row">
                <?php echo $form->labelEx($model, 'description_de'); ?>
                <?php echo $form->textArea($model, 'description_de', array('size' => 60, 'maxlength' => 500,'value'=>$DescDe)); ?>
                <?php echo $form->error($model, 'description_de'); ?>
            </div>
        </div>


    </div>
    <div class="span3">
        <div class="row">
            <?php echo $form->labelEx($model, 'category_id'); ?>

            <?php echo $form->dropDownList($model, 'category_id', CHtml::listData(Category::model()->findAll(), 'id', 'name'), array('prompt' => Yii::t('content', 'Categoria'))); ?>

            <?php echo $form->error($model, 'category_id'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model, 'activ'); ?>
            <?php echo $form->dropDownList($model, 'activ', array('0' => Yii::t("content", 'Não'), '1' => Yii::t("content", 'Sim'))); ?>
            <?php echo $form->error($model, 'activ'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model, 'user_id'); ?>
            <?php echo $form->dropDownList($model, 'user_id', CHtml::listData(User::model()->findAll(), 'id', 'username'), array('prompt' => Yii::t('content', 'Utilizador'))); ?>

            <?php echo $form->error($model, 'user_id'); ?>
        </div>
        <div class="row">
            <?php echo $form->labelEx($model, 'date_add'); ?>
            <?php echo $form->textField($model, 'date_add', array('size' => 10, 'maxlength' => 10, 'class' => 'dtpk')); ?>
            <?php echo $form->error($model, 'date_add'); ?>
        </div>

        <div class="row">
            <?php echo $form->labelEx($model, 'date_expire'); ?>
            <?php echo $form->textField($model, 'date_expire', array('size' => 10, 'maxlength' => 10, 'class' => 'dtpk')); ?>
            <?php echo $form->error($model, 'date_expire'); ?>
        </div>
        <div class="row">
            <?php echo $form->labelEx($model, 'amount'); ?>
            <?php echo $form->textField($model, 'amount'); ?>
            <?php echo $form->error($model, 'amount'); ?>
        </div>

    </div>
    <div class="row buttons right span5">
        <?php echo CHtml::submitButton($model->isNewRecord ? Yii::t('content', 'Criar') : Yii::t('content', 'Guardar'), array('class' => 'btn btn-primary')); ?>
    </div>

    <div class="clear">
    </div>
    <?php $this->endWidget(); ?>

</div><!-- form -->